
package it.lucci.ricochet.entities;
 
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;

/**
 * @author Gabriele Lucci
 * @version 1.0
 * Copyright 2012, Gabriele Lucci
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Pad implements Runnable {
    
    private double x;
    private double y;
    private double width;
    private double height;
    private double initialWidth;
    private double initialHeight;
    
    public Pad() {}
    /**
     * Costruttore
     * @param x
     * @param y
     * @param width
     * @param heigth 
     */
    public Pad(double x, double y, double width, double heigth) {
        this.x = x;
        this.y = y;
        this.initialWidth = this.width = width;
        this.height = this.height = heigth;
    }
    /**
     * 
     * @param g2 
     */
    public void draw(Graphics2D g2) {
        g2.fill(new Rectangle2D.Double(x, y, width, height));
    }
    /**
     *
     */
    @Override
    public void run() {
        
    }
 
    public double getX() {    
        return x;
    }
    /**
     * 
     * @param x 
     */
    public void setX(double x) {
        this.x = x;
    }
    /**
     * 
     * @return 
     */
    public double getY() {
        return y;
    }
    /**
     * 
     * @param y 
     */
    public void setY(double y) {
        this.y = y;
    }
    /**
     * 
     * @return 
     */
    public double getWidth() {
        return width;
    }
    /**
     * 
     * @param width 
     */
    public void setWidth(double width) {
        this.width = width;
    }
    /**
     * 
     * @return 
     */
    public double getHeight() {
        return height;
    }
    /**
     * 
     * @param height 
     */
    public void setHeight(double height) {
        this.height = height;
    }

    public double getInitialWidth() {
        return initialWidth;
    }

    public void setInitialWidth(double initialWidth) {
        this.initialWidth = initialWidth;
    }

    public double getInitialHeight() {
        return initialHeight;
    }

    public void setInitialHeight(double initialHeight) {
        this.initialHeight = initialHeight;
    }
    /**
     * 
     * @return la rappresentazione String di questo Pad
     */
    @Override
    public String toString() {
        return "Pad{" + "x=" + x + ", y=" + y + ", width=" + width + ", height=" + height + '}';
    }

}
